package org.lottery.activity;

import org.lottery.fragment.SettingsFragment;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class SettingsActivity extends PreferenceActivity {

    public static final String SETTINGS_REWARD_QUANTITY = "settings_reward_quantity";
    public static final String SETTINGS_REWARD_PATH = "settings_reward_path";
    public static final String SETTINGS_GOODLUCK_PATH = "settings_goodluck_path";
    public static final String SETTINGS_OPEN_PATH = "settings_open_path";

    private SettingsFragment sf = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        if (savedInstanceState == null) {
            SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
            sf = new SettingsFragment();
            sf.setShared(preferences);
            getFragmentManager().beginTransaction()
                    .replace(android.R.id.content, sf)
                    .commit();
        }
    }

}
